const Mock = require('mockjs');

module.exports = function (app) {
  // 监听请求
  app.get(process.env.VUE_APP_BASE_API_CONTEXT + '/test/get0', function (req, res) {
    console.log("mock\\test\\admin.js req.data", req.data)
    console.log("mock\\test\\admin.js req.body", req.body)
    console.log("mock\\test\\admin.js req.params", req.params)
    console.log("mock\\test\\admin.js req.query", req.query)
    console.log("")
    console.log("")
    res.json({
      code: 20000,
      message: 'success',
      source: 'test',
      data: Mock.mock({
        _id: "@id()",
        title: "@id()",
        complete: false
      })
    });
  });
}
